package exception;
public class Test1{
    public static String output="";
    public static void foo(int i) {
        try {
            if(i==1)
                throw new  Exception("i不能为1");
                output+="A";
        } catch (Exception e) {
            System.out.println(e.getMessage());
            output+="M";
            return;
        }finally {
            output+="C";
        }
        output+="G";

    }
    public static void main(String[] args) {
        foo(0);
        foo(1);
        System.out.println(output);
    }
}